import request from '@/utils/request'

// 查询用户列表
export function listNeeds(query) {
  return request({
    url: '/sys/needs/page',
    method: 'post',
    data: query
  })
}

export function getNeedsByid(id) {
  return request({
    url: '/sys/needs/getById/' + id,
    method: 'get'
  })
}

export function addNeeds(data) {
  return request({
    url: '/sys/needs/save',
    method: 'post',
    data: data
  })
}

export function delNeeds(id) {
  return request({
    url: "/sys/needs/deleteById/" + id,
    method: 'DELETE'
  })
}

export function updateNeeds(data) {
  return request({
    url: "/sys/needs/update",
    method: "put",
    data: data
  })
}
